package Professor;

import java.awt.BorderLayout;
import java.awt.Dialog.ModalityType;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.BoxLayout;

import java.awt.FlowLayout;
import java.awt.Dimension;

import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JButton;
import javax.swing.SwingConstants;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

public class Professor extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Professor frame = new Professor();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Professor() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 200, 1024, 768);
		setTitle("교수 공간");
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(new BorderLayout(0, 0));
		
		JPanel panel = new JPanel();
		panel.setPreferredSize(new Dimension(10, 100));
		contentPane.add(panel, BorderLayout.NORTH);
		panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
		
		JButton btnNewButton = new JButton("교수 정보 등록");
		btnNewButton.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
			setModalExclusionType(getModalExclusionType());
			}
		});
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			}
		});
		btnNewButton.setHorizontalTextPosition(SwingConstants.CENTER);
		panel.add(btnNewButton);
		
		JButton button = new JButton("교수 정보 수정");
		panel.add(button);
		
		JPanel panel_1 = new JPanel();
		panel_1.setPreferredSize(new Dimension(200, 10));
		contentPane.add(panel_1, BorderLayout.WEST);
		panel_1.setLayout(new BoxLayout(panel_1, BoxLayout.Y_AXIS));
		
		JMenu mnSub = new JMenu("과목 등록 / 조회");
		panel_1.add(mnSub);
		
		JMenuItem mi1 = new JMenuItem("과목 조회");
		mnSub.add(mi1);
		
		JMenuItem mi2 = new JMenuItem("과목 등록");
		mnSub.add(mi2);
		
		JMenuItem mi3 = new JMenuItem("과목 수정");
		mnSub.add(mi3);
		
		JMenu mnLecture = new JMenu("강의실 등록 / 조회");
		panel_1.add(mnLecture);
		
		JMenuItem mi4 = new JMenuItem("강의실 조회");
		mnLecture.add(mi4);
		
		JMenuItem mi5 = new JMenuItem("강의실 등록");
		mnLecture.add(mi5);
		
		JMenuItem mi6 = new JMenuItem("강의실 수정");
		mnLecture.add(mi6);
		
		JMenu mnDate = new JMenu("일정 등록 / 조회");
		panel_1.add(mnDate);
		
		JMenuItem mi7 = new JMenuItem("일정 조회");
		mnDate.add(mi7);
		
		JMenuItem mi8 = new JMenuItem("일정 등록");
		mnDate.add(mi8);
		
		JMenuItem mi9 = new JMenuItem("일정 수정");
		mnDate.add(mi9);
		
		JMenu mnSungJuk = new JMenu("성적 등록");
		panel_1.add(mnSungJuk);
		
		JMenuItem mi10 = new JMenuItem("성적 조회");
		mnSungJuk.add(mi10);
		
		JMenuItem mi11 = new JMenuItem("성적 등록");
		mnSungJuk.add(mi11);
		
		JMenuItem mi12 = new JMenuItem("성적 수정");
		mnSungJuk.add(mi12);
		
		JLabel label = new JLabel("본문이오");
		contentPane.add(label, BorderLayout.CENTER);
	}

}
